package dimensional.traveler.server.persistence.mock;

import dimensional.traveler.shared.model.ConversationLine;
import dimensional.traveler.shared.model.Mission;
import dimensional.traveler.shared.model.Shop;
import dimensional.traveler.shared.model.Trainer;
import dimensional.traveler.shared.model.Universe;
import dimensional.traveler.shared.model.missionSequence.CharacterClassChoice;
import dimensional.traveler.shared.model.missionSequence.Cinematic;
import dimensional.traveler.shared.model.missionSequence.ScriptedBattle;

public class MockMissionFactory {
	public Mission createTutorialMission() {

		Mission mission = new Mission("tutorial");
		mission.setUniverse(Universe.Modern);
		mission.setShortDescription("Tutorial");
		mission.setLongDescription("Strange groups often visit a remote warehouse. They were not identified, but several members seemed armed. Drug trafficking may be involved. Your team will raid the warehouse at 04:00");
		{
			CharacterClassChoice characterClassChoice = new CharacterClassChoice();
			mission.addMissionSequence(characterClassChoice);
		}
		{
			Cinematic tutorialIntro = new Cinematic();

			tutorialIntro.setBackgroundImageId("cia-background.jpg");

			ConversationLine line1 = new ConversationLine();
			line1.characterId = "general_crozier";
			line1.line = "Good morning, gentlemen.";
			tutorialIntro.addLineToConversation(line1);

			ConversationLine line2 = new ConversationLine();
			line2.characterId = "general_crozier";
			line2.line = "Good day, gentlemen.";
			tutorialIntro.addLineToConversation(line2);

			ConversationLine line3 = new ConversationLine();
			line3.characterId = "general_crozier";
			line3.line = "Good evening, gentlemen.";
			tutorialIntro.addLineToConversation(line3);

			ConversationLine line4 = new ConversationLine();
			line4.characterId = "general_crozier";
			line4.line = "Good night, gentlemen.";
			tutorialIntro.addLineToConversation(line4);

			mission.addMissionSequence(tutorialIntro);
		}
		{ 
			ScriptedBattle tutorialBattle = new ScriptedBattle();
			
			mission.addMissionSequence(tutorialBattle);
		}
		{
			Shop shop = new Shop();
			shop.setId("modern-weapons");
			shop.setShortDescription("Modern firearms shop");
			shop.setLongDescription("The shop sells 21st century military grade weaponry: sub-machine guns and assault rifles.");
			mission.addShop(shop);
		}
		{
			Trainer trainer = new Trainer();
			trainer.setId("modern-weapons");
			trainer.setShortDescription("Modern firearms trainer");
			trainer.setLongDescription("The trainer teaches the handling of 21st century firearms.");
			mission.addTrainer(trainer);
		}

		return mission;
	}

	public Mission createRomanMission() {

		Mission romanInvestigation = new Mission("roman-investigation");
		romanInvestigation.setUniverse(Universe.Roman);
		romanInvestigation.setShortDescription("Investigate a Roman Patriarch");
		romanInvestigation
				.setLongDescription("A less known, but influential Roman Patriarch is dabbling in the forbidden arts. Investigate whether he can attain dimensional travel.");

		return romanInvestigation;
	}

	public Mission createApacheMission() {
		Mission apacheTribalMeeting = new Mission("apache-tribal-meeting");
		apacheTribalMeeting.setUniverse(Universe.NativeAmerican);
		apacheTribalMeeting.setShortDescription("Participate at an Apache tribal gathering");
		apacheTribalMeeting
				.setLongDescription("The Apachean tribes are gathering in a previously unseen manner at an astronomically special time and location. Participate and investigate the nature of their gathering.");

		return apacheTribalMeeting;
	}

}
